﻿local PMEngine, L, PrivateDB, ProfileDB, GlobalDB = unpack(select(2, ...))
local AS = PMEngine:GetModule('AddOnSkins')
local S = PMEngine:GetModule('Skins')

local name = "Grid2Skin"
local function SkinGrid2(self)
	local Grid2 = _G.Grid2
	local Grid2Layout = _G.Grid2Layout
	local Grid2Frame = _G.Grid2Frame
	
	Grid2Layout.UpdateTextures = function()
		local f = Grid2Layout.frame
		local p = Grid2Layout.db.profile
		-- update backdrop data
		--Grid2Layout.frameBackdrop.edgeFile = Grid2:MediaFetch("border", p.BorderTexture)
		--f:SetBackdrop( Grid2Layout.frameBackdrop )
		-- create bg texture
		--f.texture = f.texture or f:CreateTexture(nil, "BORDER")
		--f.texture:SetTexture("Interface\\ChatFrame\\ChatFrameBackground")
		--f.texture:SetPoint("TOPLEFT", f, "TOPLEFT", 4, -4)
		--f.texture:SetPoint("BOTTOMRIGHT", f, "BOTTOMRIGHT", -4, 4)
		--f.texture:SetBlendMode("ADD")
		--f.texture:SetGradientAlpha("VERTICAL", .1, .1, .1, 0, .2, .2, .2, 0.5)
	end
	Grid2Layout.UpdateColor = function() end
	AS:SkinFrame(Grid2LayoutFrame)
end

AS:RegisterSkin(name,SkinGrid2)